.duyi-icon {
  --duyi-icon-color: inherit;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
  fill: currentColor;
  color: var(--duyi-icon-color);
  font-size: inherit;
}

@each $val in primary, info, success, warning, danger {
  // 当你挂上 .duyi-icon--primary 类之后
  // 你的 --duyi-icon-color 这个变量的值就会变成 var(--duyi-color-primary)
  .duyi-icon--#{$val} {
    --duyi-icon-color: var(--duyi-color-#{$val});
  }
}
